package pers.qianyu.module.security.exception;


import pers.qianyu.exception.*;

/**
 * 鉴权异常
 *
 * @author mizzle rain
 * @date 2020-11-11 10:31
 */
public class PreAuthorizeException extends LambBaseException {
    private static final long serialVersionUID = -2848442934018164849L;
    private final Integer code;

    public PreAuthorizeException(SecurityErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getMessage());
        this.code = errorCodeEnum.getCode();
    }

    @Override
    public Integer getCode() {
        return code;
    }
}
